<template>
  <div class="header">
    <img src="../../assets/header/left.png" @click="getBack">{{title}}
  </div>
</template>

<script>
  export default {
    data() {
      return {
        title: "",
      }
    },

    watch: {
      $route(to, from) {
        this.title = document.title
      },
    },
    mounted() {
      let that = this
      this.$nextTick(() => {
        that.title = document.title
      })
    },
    methods: {
      getBack() {
        this.$router.history.go(-1)
      },
      
    }
  };
</script>

<style lang="less" scoped>
  .header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 30px;
    line-height: 30px;
    color: #fff;
    padding: 5px 0;
    background: #1677FF;
    box-shadow: 0px 0px 9px 2px rgba(62, 62, 62, 0.25);

    img {
      height: 30px;
      padding: 0 5px;
    }
  }
</style>
